#ifndef APPENDER_H_
#define APPENDER_H_

#include <string>
#include "Logger.h"

using namespace std;

namespace phnq
{
	namespace kit
	{
		namespace log
		{
			class Appender
			{
				public:
					Appender();
					~Appender();
					void append(Logger *logger, short level, LoggerTime t, char *chars);
				
				protected:
					virtual void appendLine(char *chars) = 0;
					
				private:
					char lineBuf[4096];
			};
			
			class StdOutAppender : public Appender
			{
				public:
					static StdOutAppender* getInstance();
				
				protected:
					void appendLine(char *chars);
			};
		}
	}
}

#endif // APPENDER_H_
